package cn.yuhan.simplediary.diary.entity;

import cn.yuhan.simplediary.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

@EqualsAndHashCode(callSuper = true)
@Data
@TableName("diaries")
public class Diary extends BaseEntity {

    @TableId(type = IdType.AUTO)
    private Long id;

    private Long userId;
    /**
     * 标题
     */
    private String title;
    /**
     * 内容
     */
    private String content;

    /**
     * 是否被管理员隐藏
     */
    private boolean hidden;
}